package com.mcxx.modules.miniSalvation.family.dao.read;

import com.mcxx.modules.miniSalvation.check.dto.CheckMemberDTO;
import com.mcxx.modules.miniSalvation.check.dto.IntegrateCheckMemberDTO;
import com.mcxx.modules.miniSalvation.family.dto.*;
import com.mcxx.modules.miniSalvation.family.entity.FamilyMemberEntity;
import com.mcxx.modules.miniSalvation.family.param.BatchProtectParam;
import com.mcxx.modules.miniSalvation.salary.dto.FamilyMemberSalaryDTO;
import com.yinhai.ta404.module.mybatis.mapper.Ta404SupportMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface FamilyMemberReadDao extends Ta404SupportMapper {

    List<FamilyMemberEntity> listAll();


    FamilyMemberEntity getById(String id);


    FamilyMemberDTO getByIdAndBusinessCode(@Param("id")String id,@Param("businessCode")String businessCode);


    String queryMemberIDByidCard(String idcard);


    FamilyMemberEntity queryMemberIdByCardId(@Param("cardId") String cardId);


    int getMemberNumberByFmyId(@Param("familyId")String familyId);


    int getMemberNumByFmyId(@Param("familyId")String familyId);


    List<FamilyMemberEntity> listNormalMemberByFamilyId(String familyId);


    List<FamilyMemberEntity> listByFamilyId(String familyId);

    List<FamilyMemberEntity> listHistroyByOrderId(String orderId);


    List<FamilyMemberDTO> listTempByOrderId(String orderId);


    List<FamilyMemberDTO> listMemberByOrderId(String orderId);


    FamilyMemberEntity queryFamilyMasterByOrderId(String orderId);


    String queryMasterMemberId(String familyId);


    String querySpouseByFamId(String familyId);


    FamilyMemberEntity queryMemberStateByCardId(String cardId);


    String queryMemberIdFamilyId(@Param("familyId")String familyId);


    MemberCardRtnDTO queryMemberByCardId(String cardId);


    FamilyMemberEntity getMemberIdByCardId(String cardId);


    FamilyMemberEntity queryMasterByMemberId(String id);


    String getSpouseIdCardByFamilyId(String familyId);

    Map<String,String> getMemberIdAndFamilyIdByIdCard(String idcard);

    List<BatchProtectResultDTO> queryZanTingList(BatchProtectParam param);


    List<FamilyMemberEntity> queryHistoryInfo(String id);


    List<FamilyMemberEntity> getFamilyRelationMapByFamilyId(String familyId);


    List<FamilyMemberSalaryDTO> getMemberByMasterIdCard(String familyId);


    List<FamilyMemberEntity> queryByFamilyId(String familyId);


    String getFamilyIdById(String id);


    String getMasterIdCardByFamilyId(String familyId);


    Map<String, Integer> countMemberNumAndSaveMemberNum(String familyId);


    List<String> getMasterInfoNoPerfect(List<String> idcardList);



    List<CheckMemberDTO> selectMemberListInfo(String familyId);



    List<FamilyMemberEntity> getFirstStartDate(String familyId);

    List<String> selectMasterCount(List<String> idList);


    List<MemberSalaryOrderDTO> getMemberInfoByOrderId(String orderId);


    int cntFamilyMaster(String familyId);


    List<String> cntFamilyMasterErrorList(List<String> familyIdList);


    List<FamilyMemberEntity> getExMemberInfoByOrderId(String orderId);


    String cntCompleteInfoNum(@Param("familyId")String familyId, @Param("businessType")String businessType,@Param("standType")String standType);


    List<String> cntCompleteInfoNumList(List<String> familyIdList);


    String getMasterIsHelpPoor(String familyId);

    FamilyMemberEntity getMasertInfo(String familyId);


    List<FamilyMemberEntity> getFamilyApplyMapByFamilyId(String familyId);


    String getRelationByMemberId(@Param("memberId")String memberId);


    List<FamilyMemberEntity> getMasterByFamilyIds(List<String> familyIdList);

    int selectCountByIdcard(@Param("idcard")String idcard,@Param("familyId") String familyId);

    FamilyMemberEntity selectApplyByFamilyId(@Param("familyId") String familyId);

    List<String> getMemberIdsByFamilyId(String familyId);

    List<Map<String,Object>> queryListToCalculate(String familyId);

    List<Map<String,Object>> queryLowerListToCalculate(String familyId);

    int selectHouseholdSuspend(String orderId);


    int selectHouseholdSuspendByFamilyId(String familyId);


    int selectHouseholdSuspendByHistory(String orderId);



    MemberCardRtnDTO queryMemberByLowIncomCardId(String idcard);

    MemberCardRtnDTO queryInvalidOrderMemberByCardId(String idcard);

    FamilyMainDTO selectFamilySaveNum(String idcard);

   List<FamilyMemberEntity> listMemberByIdcard(String idcard);

    MemberCardRtnDTO queryLowerMemberByCardId(String cardId);


    MemberCardRtnDTO queryLowerDeleteMemberByCardId(String cardId);

    MemberCardRtnDTO queryLowerMemberHistoryByCardId(String idcard);


    int cntFamilyMember(String familyId);

    List<IntegrateCheckMemberDTO> selectIntegrateMember(String orderId,String familyId);


    List<FamilyMemberEntity> listLowerByFamilyId(String familyId);


    List<FamilyMemberEntity> listNormalLowerByFamilyId(String familyId);


    List<FamilyMemberEntity> selectMemberInFamily(String familyId);


    List<FamilyMemberEntity> listHppLowerByFamilyId(String familyId);
}
